package com.example.network;

import com.google.gson.GsonBuilder;

import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by zhaoyulu on 5/9/18.
 */

public class getRetrofitService {

    private static RetrofitService retrofitService;

    public static RetrofitService getService(){
        if(retrofitService!=null) return retrofitService;

        Retrofit retrofit = new Retrofit.Builder()
                .baseUrl("http://101.132.121.32:8080/ServletTest/")
                .addConverterFactory(GsonConverterFactory.create(new GsonBuilder().create()))
                .build();
        retrofitService= retrofit.create(RetrofitService.class);
        return retrofitService;
    }

}
